Practical Model-Based Static Analysis for Definite Logic Programs

نویسندگان

  • John P. Gallagher
  • Dmitri Boulanger
  • Hüseyin Saglam
چکیده

The declarative semantics of de nite logic programs is the basis of an elegant and practical framework for their static analysis. We de ne a core semantics parameterised by a preinterpretation of the language underlying the program. The concrete semantics is given by an extended Herbrand interpretation, capturing the correct answers of a program. The semantics is computed as the least xed point of an immediate consequences operator. An abstract semantics is speci ed simply by giving, for each constant and function in the program, a denotation in an abstract domain of interpretation. No abstract operations such as abstract uni cation need to be de ned. The directness and simplicity of this approach is then illustrated by specifying and implementing a number of abstract interpretations. These include various mode analyses, analyses on the structure of lists and the length of lists, and simple and polymorphic types. The implementations used for the experiments are based on abstract compilation and existing bottom-up analysis tools. Even without any domain-speci c optimisations, the results indicate that the approach is practical for many useful domains.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Extracting Inheritance Hierarchies from Prolog Programs: A System Based on the Inference of Type Relations

Consistency Checking of Automata Functional Specifications p. 76 Yet Another Application for Toupie: Verification of Mutual Exclusion Algorithms p. 86 Parsing with DCG-Terms p. 98 A First Order Resolution Calculus with Symmetries p. 110 Ordered Paramodulation and Resolution as Decision Procedure p. 122 Static Analysis of Prolog with Cut p. 134 A New Type Theory for Representing Logics p. 146 Ve...

متن کامل

Dependency Triples for Improving Termination Analysis of Logic Programs with Cut

In very recent work, we introduced a non-termination preserving transformation from logic programs with cut to definite logic programs. While that approach allows us to prove termination of a large class of logic programs with cut automatically, in several cases the transformation results in a non-terminating definite logic program. In this paper we extend the transformation such that logic pro...

متن کامل

Two Classes of Boolean Functions for Dependency Analysis

Many static analyses for declarative programming/database languages use Boolean functions to express dependencies among variables or argument positions. Examples include groundness analysis, arguably the most important analysis for logic programs, finiteness analysis and functional dependency analysis for databases. We identify two classes of Boolean functions that have been used: positive and ...

متن کامل

A Framework for Assertion-Based Debugging in Constraint Logic Programming

A b s t r a c t . We propose a general framework for assertion-based debugging of constraint logic programs. Assertions are linguistic constructions which allow expressing properties of programs. We define assertion schemas which allow writing (partial) specifications for constraint logic programs using quite general properties, including user-defined programs. The framework is aimed at detecti...

متن کامل

Set-based Error Diagnosis of Concurrent Constraint Programs

We present an automated method for the static prediction of the runtime error`deadlock or failure' in concurrent constraint programs. Operationally, the method is based on a new set-based analysis of reactive logic programs which computes an approximation of the greatest-model semantics. Semantically , the method is based on the connection between the inevitability of`deadlock or failure' in co...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995